//
//  DetailList.swift
//
//  Created by 邱仙凯 on 2022/7/28
//  Copyright (c) . All rights reserved.
//

import Foundation
import ObjectMapper

public struct DetailList: Mappable {

  // MARK: Declaration for string constants to be used to decode and also serialize.
  private struct SerializationKeys {
    static let se = "se"
    static let ggxh = "ggxh"
    static let ssflbm = "ssflbm"
    static let sl = "sl"
    static let spsl = "spsl"
    static let je = "je"
    static let hsdj = "hsdj"
    static let hwmc = "hwmc"
    static let txrqq = "txrqq"
    static let cph = "cph"
    static let bhsdj = "bhsdj"
    static let txrqz = "txrqz"
    static let mxbh = "mxbh"
    static let jldw = "jldw"
    static let hsje = "hsje"
    static let lx = "lx"
    static let fyxm = "fyxm"
  }

  // MARK: Properties
  public var se: String?
  public var ggxh: String?
  public var ssflbm: String?
  public var sl: String?
  public var spsl: String?
  public var je: String?
  public var hsdj: String?
  public var hwmc: String?
  public var txrqq: String?
  public var cph: String?
  public var bhsdj: String?
  public var txrqz: String?
  public var mxbh: String?
  public var jldw: String?
  public var hsje: String?
  public var lx: String?
  public var fyxm: String?

  // MARK: ObjectMapper Initializers
  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public init?(map: Map){

  }

  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public mutating func mapping(map: Map) {
    se <- map[SerializationKeys.se]
    ggxh <- map[SerializationKeys.ggxh]
    ssflbm <- map[SerializationKeys.ssflbm]
    sl <- map[SerializationKeys.sl]
    spsl <- map[SerializationKeys.spsl]
    je <- map[SerializationKeys.je]
    hsdj <- map[SerializationKeys.hsdj]
    hwmc <- map[SerializationKeys.hwmc]
    txrqq <- map[SerializationKeys.txrqq]
    cph <- map[SerializationKeys.cph]
    bhsdj <- map[SerializationKeys.bhsdj]
    txrqz <- map[SerializationKeys.txrqz]
    mxbh <- map[SerializationKeys.mxbh]
    jldw <- map[SerializationKeys.jldw]
    hsje <- map[SerializationKeys.hsje]
    lx <- map[SerializationKeys.lx]
    fyxm <- map[SerializationKeys.fyxm]
  }

  /// Generates description of the object in the form of a NSDictionary.
  ///
  /// - returns: A Key value pair containing all valid values in the object.
  public func dictionaryRepresentation() -> [String: Any] {
    var dictionary: [String: Any] = [:]
    if let value = se { dictionary[SerializationKeys.se] = value }
    if let value = ggxh { dictionary[SerializationKeys.ggxh] = value }
    if let value = ssflbm { dictionary[SerializationKeys.ssflbm] = value }
    if let value = sl { dictionary[SerializationKeys.sl] = value }
    if let value = spsl { dictionary[SerializationKeys.spsl] = value }
    if let value = je { dictionary[SerializationKeys.je] = value }
    if let value = hsdj { dictionary[SerializationKeys.hsdj] = value }
    if let value = hwmc { dictionary[SerializationKeys.hwmc] = value }
    if let value = txrqq { dictionary[SerializationKeys.txrqq] = value }
    if let value = cph { dictionary[SerializationKeys.cph] = value }
    if let value = bhsdj { dictionary[SerializationKeys.bhsdj] = value }
    if let value = txrqz { dictionary[SerializationKeys.txrqz] = value }
    if let value = mxbh { dictionary[SerializationKeys.mxbh] = value }
    if let value = jldw { dictionary[SerializationKeys.jldw] = value }
    if let value = hsje { dictionary[SerializationKeys.hsje] = value }
    if let value = lx { dictionary[SerializationKeys.lx] = value }
    if let value = fyxm { dictionary[SerializationKeys.fyxm] = value }
    return dictionary
  }

}
